package com.esri.android.map.ogc;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import com.esri.core.geometry.Envelope;
import com.esri.core.geometry.SpatialReference;
import java.util.List;
import java.util.Map;

/* loaded from: classes.dex */
public class WMSLayerInfo {
    private List<WMSLayerInfo> a = null;
    private String b = null;
    private String c = null;
    private String d = null;
    private Envelope e = null;
    private SpatialReference f = null;

    public List<WMSLayerInfo> getSubLayers() {
        return this.a;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void a(List<WMSLayerInfo> list) {
        this.a = list;
    }

    public Envelope getExtent() {
        return this.e;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void a(Envelope envelope) {
        this.e = envelope;
    }

    public SpatialReference getSpatialReference() {
        return this.f;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void a(SpatialReference spatialReference) {
        this.f = spatialReference;
    }

    public String getName() {
        return this.b;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void a(String str) {
        this.b = str;
    }

    public String getTitle() {
        return this.c;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void b(String str) {
        this.c = str;
    }

    public String getLegendURL() {
        return this.d;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void c(String str) {
        this.d = str;
    }

    public Bitmap retrieveLegendImage() {
        String str = this.d;
        if (str == null || str.length() == 0) {
            return null;
        }
        try {
            byte[] a = com.esri.core.internal.io.handler.a.a(this.d, (Map<String, String>) null);
            return BitmapFactory.decodeByteArray(a, 0, a.length);
        } catch (Exception unused) {
            throw new RuntimeException("Fails to retrive legend image");
        }
    }

    public int hashCode() {
        List<WMSLayerInfo> list = this.a;
        int hashCode = ((list == null ? 0 : list.hashCode()) + 31) * 31;
        String str = this.b;
        int hashCode2 = (hashCode + (str == null ? 0 : str.hashCode())) * 31;
        String str2 = this.c;
        return hashCode2 + (str2 != null ? str2.hashCode() : 0);
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj != null && (obj instanceof WMSLayerInfo)) {
            WMSLayerInfo wMSLayerInfo = (WMSLayerInfo) obj;
            List<WMSLayerInfo> list = this.a;
            if (list == null) {
                if (wMSLayerInfo.a != null) {
                    return false;
                }
            } else if (!list.equals(wMSLayerInfo.a)) {
                return false;
            }
            String str = this.b;
            if (str == null) {
                if (wMSLayerInfo.b != null) {
                    return false;
                }
            } else if (!str.equals(wMSLayerInfo.b)) {
                return false;
            }
            String str2 = this.c;
            if (str2 == null) {
                if (wMSLayerInfo.c != null) {
                    return false;
                }
            } else if (!str2.equals(wMSLayerInfo.c)) {
                return false;
            }
            return true;
        }
        return false;
    }
}
